<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let animal = { eats: true };
      let rabbit = { name: "jack", age: 20, jumps: true, __proto__: animal };

      for (let key in rabbit) {
        if (rabbit.hasOwnProperty(key)) {
          console.log(key);
        }
      }
      Object.keys(rabbit).forEach((el) => console.log(el));
      //   Object.keys(rabbit).forEach(console.log);
      //   Object.keys(rabbit).forEach(alert);

      //   console.log(Object.keys(rabbit));
      //   console.log(Object.values(rabbit));
    </script>
  </body>
</html>
